/*
 * @Author: liu-tiezhu1 1471528799@qq.com
 * @Date: 2023-11-22 08:14:13
 * @LastEditors: liu-tiezhu1 1471528799@qq.com
 * @LastEditTime: 2023-11-25 10:25:40
 * @FilePath: \customer-relations\src\services\xiaoxi.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post, get, put, del } from "@/utils/NetworkRequest/index";
import { objToQueryString } from "@/utils/Tools/query"

//待审批列表
export const messageListApi = (page = 1, query = {}, size = 10) => {

    query = objToQueryString(query)

    return get<Imessage.ImessageList>(`/api/message/pending?page=${page}&size=${size}${query}`)
}

export const messageListApis = (page = 1, size = 10) => {
    return get<Imessage.ImessageList>(`/api/message/approved?page=${page}&size=${size}`)
}

export const messageshenpiApis = (id: number) => {
    return get<any>(`/api/message/approved/:${id}`)
}

//审批请求
export const messageshenpiShenpi = (id: number) => {
    return post<any>(`/api/message/approveds/`, id)
}


export const messagexiaoxiApi=(page=1,size=10)=>{
    return get<Imessage.xitongxiaoxi>(`/api/message/system?page=${page}&size=${size}`)
}